<template>
	<view>
		<view class="headtop"></view>
		<view class="headtitle flexcenter">
			<view class="sanshier flexcenter fonweight xiaohei">首页</view>
		</view>
		<view class="" style="position: fixed;top: 150rpx;width: 100%;z-index: 3;">
			<scroll-view scroll-y="true" style="height: 100vh;">
				<view class="mainpadding">
					<u-swiper :list="list1" keyName="image_text" height="160" indicator circular @click="lbtclick"
						radius="0"></u-swiper>
					<view class="xiaohei margin_top6 sanshier fonweight">功能服务</view>
					<view class="mainpadding_top ffffff radius flexbetween" @click="jumpurl('/pages/index/bazics?type=1')">
						<view class="flexleft">
							<image src="@/static/system/index1.png" class="leftimg margin_right3" mode=""></image>
							<view class="xiaohei sanshier">八字排盘</view>
						</view>
						<u-icon name="arrow-right" color="#938F90"></u-icon>
					</view>
					<view class="mainpadding_top ffffff radius flexbetween" @click="jumpurl('/pages/index/bazics?type=3')">
						<view class="flexleft">
							<image src="@/static/system/index2.png" class="leftimg margin_right3" mode=""></image>
							<view class="xiaohei sanshier">紫薇排盘</view>
						</view>
						<u-icon name="arrow-right" color="#938F90"></u-icon>
					</view>
					<view class="mainpadding_top ffffff radius flexbetween" @click="jumpurl('/pages/index/bazics?type=2')">
						<view class="flexleft">
							<image src="@/static/system/index3.png" class="leftimg margin_right3" mode=""></image>
							<view class="xiaohei sanshier">八字精算</view>
						</view>
						<u-icon name="arrow-right" color="#938F90"></u-icon>
					</view>
					<view class="mainpadding_top ffffff radius flexbetween" @click="jumpurl('/pages/index/qimendj')">
						<view class="flexleft">
							<image src="@/static/system/index4.png" class="leftimg margin_right3" mode=""></image>
							<view class="xiaohei sanshier">奇门遁甲</view>
						</view>
						<u-icon name="arrow-right" color="#938F90"></u-icon>
					</view>
					<view class="mainpadding_top ffffff radius flexbetween" @click="jumpurl('/pages/index/shuzicjx')">
						<view class="flexleft">
							<image src="@/static/system/index5.png" class="leftimg margin_right3" mode=""></image>
							<view class="xiaohei sanshier">数字测吉凶</view>
						</view>
						<u-icon name="arrow-right" color="#938F90"></u-icon>
					</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				list1: []
			}
		},
		onLoad() {
			this.getbanner()
		},
		methods: {
			jumpurl(url){
				if (!httpRequest.checkIsLogin()) {
					uni.navigateTo({
						url: "/pages/login/login"
					})
					return false
				}
				uni.navigateTo({
					url
				})
			},
			getbanner() { //获取轮播图
				httpRequest.request('/api/index/getAdvertiseList', 'POST', {
					advertise_position_id: 1,
					is_more: 1,
				}).then(res => {
					this.list1 = res.data
				}).catch(err => {})
			},
		}
	}
</script>

<style lang="scss">
	.headtop {
		background-image: url("@/static/system/suangua.png");
		background-size: 100% 100%;
		width: 100%;
		height: 350rpx;
		position: fixed;
		top: 0;
		right: 0;
		z-index: 2;
	}

	.headtitle {
		position: fixed;
		top: 0;
		right: 0;
		z-index: 3;
		width: 100%;
		height: 150rpx;
	}

	.leftimg {
		width: 50rpx;
		height: 50rpx;

	}
</style>